package com.cp.mtq.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.cp.mtq.utils.SnowFlakeUtil;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

@Data
public class MtqIntroduce implements Serializable{

    private String id = String.valueOf(SnowFlakeUtil.getFlowIdInstance().nextId());

    private String title;
    private String content;
    private String author;
    private Integer regionId;
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date publishTime;
    private Integer usedFlag;
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @TableField(exist = false)
    private List<MtqImage> images;
    @TableField(exist = false)
    private Integer readCount;
    @TableField(exist = false)
    private String region;
}
